package com.create404.suishoupai.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.create404.suishoupai.dto.CommentedPhotoRecordsDto;
import com.create404.suishoupai.dto.PhotoRecordCommentDto;
import com.create404.suishoupai.entity.PhotoRecordComment;
import com.create404.suishoupai.mapper.PhotoRecordCommentMapper;
import com.create404.suishoupai.service.IPhotoRecordCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author create404
 * @since 2021-07-17
 */
@Service
public class PhotoRecordCommentServiceImpl extends ServiceImpl<PhotoRecordCommentMapper, PhotoRecordComment> implements IPhotoRecordCommentService {

    @Override
    public List<PhotoRecordCommentDto> getPhotoRecordCommentList(String photoRecordId) {
        return this.baseMapper.getPhotoRecordCommentList(photoRecordId);
    }

    @Autowired
    PhotoRecordCommentMapper photoRecordCommentMapper;

    @Override
    public IPage<CommentedPhotoRecordsDto> getCommentedPhotoRecords(Page<?> page, String employeeId) {
        return photoRecordCommentMapper.getCommentedPhotoRecords(page, employeeId);
    }
}
